//
//  ExploreContentCell.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/8/30.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "ExploreContentCell.h"

@implementation ExploreContentCell

-(void)layoutSubviews{
    [self createSubViews];
}

/**
 创建页面布局
 */
-(void)createSubViews{
    UIImageView *pictureView = [[UIImageView alloc] init];
    [self.contentView addSubview:pictureView];
    [pictureView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(self.contentView);
        make.height.mas_equalTo(scaleTopAndBottom(65));
    }];
    UILabel *nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:nameLabel];
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(pictureView.mas_bottom).offset(scaleTopAndBottom(10));
        make.right.left.equalTo(self.contentView);
        make.height.mas_equalTo(scaleTopAndBottom(20));
        
    }];
    UILabel *typeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:typeLabel];
    [typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(nameLabel.mas_bottom).offset(scaleTopAndBottom(10));
        make.right.left.equalTo(self.contentView);
        make.height.mas_equalTo(scaleTopAndBottom(20));
    }];
    pictureView.backgroundColor = [UIColor cyanColor];
    nameLabel.backgroundColor = [UIColor orangeColor];
    typeLabel.backgroundColor = [UIColor greenColor];
}
@end
